package com.capinfo.accumulation.service.accounting.mybits.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.capinfo.accumulation.dao. XYRJZDao;
import com.capinfo.accumulation.model.accounting.mybist.GB_JZPZXX;
import com.capinfo.accumulation.model.accounting.mybist.HZJZPZ;
import com.capinfo.accumulation.model.accounting.mybist. XYRJZ;
import com.capinfo.accumulation.parameter.accounting.DataGrid;
import com.capinfo.accumulation.service.accounting.mybits.XYRJZServiceI;

@Service("xYRJZService")
public class  XYRJZServiceImpl implements  XYRJZServiceI {
	
	@Autowired
	XYRJZDao  xYRJZDao;
	
	@Override
	public int deleteByPrimaryKey(String id) {
		return this.xYRJZDao.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(XYRJZ record) {
		return this.xYRJZDao.insertSelective(record);
	}

	@Override
	public XYRJZ selectByPrimaryKey(String id) {
		return this.xYRJZDao.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(XYRJZ record) {
		return this.xYRJZDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public DataGrid findbyByGrid(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List<XYRJZ> retList = this.xYRJZDao.findbyByGrid(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

	/**
	 * 现银凭证数据查询
	 */
	@Override
	public DataGrid xyfindbyByGrid(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List<HZJZPZ> retList = this.xYRJZDao.xyfindbyByGrid(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

	@Override
	public List<Map<String, Object>> kmbm() {
		return xYRJZDao.kmbm();
	}

	/**
	 * 记账凭证查询
	 */
	@Override
	public DataGrid findGBByGrid(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List<GB_JZPZXX> retList = this.xYRJZDao.jzpzcx(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

	/**
	 * 转账凭证查询
	 */
	@Override
	public DataGrid zzpzByGrid(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List<HZJZPZ> retList = this.xYRJZDao.zzpzByGrid(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

	/**
	 * 转账凭证分录查询
	 */
	@Override
	public DataGrid zzpzFlByGrid(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List<GB_JZPZXX> retList = this.xYRJZDao.zzpzfl(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

	@Override
	public Map pzbhcx(Map map) {
		return this.xYRJZDao.pzbhcxByGrid(map);
	}
	
}
